package com.exam.paper.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;


/**
 * @ClassName : Category
 * @Description : 试题分类
 * @Author : WHB
 */
@Data
@Table(name = "exam_category")
public class Category {


    @Id
    @KeySql(useGeneratedKeys = true)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    private String name;
    private Long parentId;
    private String parentName;
    private Integer isParent;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date creatTime;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date reviseTime;

}
